<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('product', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('产品名称');
            $table->unsignedBigInteger('price')->default(0)->nullable()->comment('金额');
            $table->unsignedBigInteger('level_id')->comment('购买套餐的相应等级');
            $table->string('from')->comment('开始日期');
            $table->string('to')->comment('结束日期');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('product');
    }
}
